package com.ym.medical.domain.param;

import cn.hutool.core.convert.Convert;

import com.ym.common.constant.BeanCovert;
import com.ym.medical.domain.entity.HospitalEntity;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.DecimalMax;
import javax.validation.constraints.DecimalMin;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * @author: 张文博
 * @version: 2019年11月14日 12:04
 */
@Data
public class HospitalAddParam extends BeanCovert<HospitalEntity> {
    @ApiModelProperty("主键")
    private Long id;

    @ApiModelProperty("医院编码")
    private String theCode;

    @ApiModelProperty("医院名称")
    @NotNull(message="医院名称不能为空!",groups = {Add.class})
    private String theName;

    @ApiModelProperty("icon图")
    private String icon;

    @ApiModelProperty("区域")
    private String area;

    @ApiModelProperty("省份")
    private String prov;

    @ApiModelProperty("市")
    private String city;

    @ApiModelProperty("医院类别")
    private String theType;

    @ApiModelProperty("医院等级")
    private String theLevel;

    @ApiModelProperty("公/私")
    private String theOr;

    @ApiModelProperty("经度")
    @DecimalMin(value = "0.0",message = "大于0小于180的小数",groups = Add.class)
    @DecimalMax(value = "180.0",message = "大于0小于180的小数",groups = Add.class)
    @Pattern(regexp = "([^\\.]*\\.[^\\.]*)+",message = "必须是小数",groups = Add.class)
    private String lng;

    @ApiModelProperty("纬度")
    @DecimalMin(value = "0.0",message = "大于0小于90的小数",groups = Add.class)
    @DecimalMax(value = "90.0",message = "大于0小于90的小数",groups = Add.class)
    @Pattern(regexp = "[0-9]+.[0-9]+",message = "必须是小数",groups = Add.class)
    private String lat;

    @ApiModelProperty("面积")
    private Double theArea;

    @ApiModelProperty("床位数量")
    private Integer theBedNum;

    @ApiModelProperty("跳转地址")
    private String navUrl;

    @ApiModelProperty("医院地址")
    private String address;

    @ApiModelProperty("联系电话")
    private String linkPhone;

    @ApiModelProperty("医院特长")
    private String theGoods;

    @ApiModelProperty("趁车路线")
    private String thePath;

    @ApiModelProperty("医院介绍")
    private String introduction;

    @ApiModelProperty("匹配标签")
    private String tags;

    @ApiModelProperty("优势病种")
    private String advDies;

    @ApiModelProperty("优势技能")
    private String advSkill;

    @ApiModelProperty("挂号时间")
    private String regTime;

    @ApiModelProperty(notes = "门诊时间")
    private String obsTime;

    @ApiModelProperty(notes = "重点科室介绍")
    private String theGoodsDesc;

    public interface Add{

    }

}
